import 'package:taonile/generated/json/base/json_convert_content.dart';
import 'package:taonile/entity/stock_lines_entity.dart';

StockLinesEntity $StockLinesEntityFromJson(Map<String, dynamic> json) {
	final StockLinesEntity stockLinesEntity = StockLinesEntity();
	final int? code = jsonConvert.convert<int>(json['code']);
	if (code != null) {
		stockLinesEntity.code = code;
	}
	final String? msg = jsonConvert.convert<String>(json['msg']);
	if (msg != null) {
		stockLinesEntity.msg = msg;
	}
	final List<StockLinesData>? data = jsonConvert.convertListNotNull<StockLinesData>(json['data']);
	if (data != null) {
		stockLinesEntity.data = data;
	}
	return stockLinesEntity;
}

Map<String, dynamic> $StockLinesEntityToJson(StockLinesEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['code'] = entity.code;
	data['msg'] = entity.msg;
	data['data'] =  entity.data.map((v) => v.toJson()).toList();
	return data;
}

StockLinesData $StockLinesDataFromJson(Map<String, dynamic> json) {
	final StockLinesData stockLinesData = StockLinesData();
	final String? data = jsonConvert.convert<String>(json['data']);
	if (data != null) {
		stockLinesData.data = data;
	}
	final String? price = jsonConvert.convert<String>(json['price']);
	if (price != null) {
		stockLinesData.price = price;
	}
	return stockLinesData;
}

Map<String, dynamic> $StockLinesDataToJson(StockLinesData entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['data'] = entity.data;
	data['price'] = entity.price;
	return data;
}